-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docx: single numbering ID for examples - fixes #7895 #7900
Conversation
Thanks. But will this work in all cases? Does it work regardless of the example list delimiters used? e.g.
|
No, your example will unfortunately not work in any implementation of DOCX writer that supports shared identifier (as the method of sequence continuation). Or more precisely - the numbering will work but the delimiter will be the same. Microsoft Word only supports a single styling per identifier. In your example you would have to choose between one or the other delimiter. The only way to achieve combination of both delimiters in Microsoft Word (or in any other word processing software supporting OpenXML) is either by:
The only possible improvement within the given constraints would be to decide on what element of the sequence entered in markdown defines the type of the delimiter. The first one seems like the logical choice - if you agree with this I could add this to the implementation. As an aside, I am wondering how often does it actually happen that inconsistent use of delimiters in the process of numbering content is actually the desired end result. It is somewhat common that a different style is used when referencing the numbered item, but with the numbering one usually chooses a style and sticks with it throughout the document. I am course referring to the different styles for the same (single) sequence here (a case relevant for |
Seems reasonable to me.
Not very often, if ever. My guess is that we'll be okay if we let the first one control the delimiters on the rest. |
I don't think we actually want that behavior. If you try with I think we should keep the single sequence. IF it's convenient to preserve the delimiters, this could be nice, but as noted above it's unlikely to be a problem in practice if we just use the first example list item's delimiter for all the items in the sequence. |
It must be noted that the effect of the proposed change is exactly what you describe in the second paragraph - and what I understood you considered reasonable in the post before last:
Unfortunately, as mentioned, there is currently no way of implementing an uninterrupted numbering in OpenXML/DOCX (or in OpenDocument/ODT for that mater) that would enable both:
I understand that the behavior that limits the Examples to 1 delimiter throughout the document is not shared between all formats. But neither are other functionalities - e.g. probably nobody ever complained that there is an option to:
Formats that primarily target plain text editors do no support the functionally listed above due to obvious reasons. One could hardly say that insisting on the lowest common denominator would be beneficial on the other hand. Furthermore, one could even say that there is a reason that most (all?) word processors support changing only the attributes (e.g. delimiter, spacing) of the entire numbering sequence (and not a subset of it). For everything else there is support for free-style named sequences where few limits exists regarding formatting etc. Lastly, perhaps also worth point out is that Pandoc's manual does not state anywhere that one can mix delimiters within a single Example sequence, nor does it list an example of such behavior. If there were to be a change enforcing a single delimiter for other formats, it would therefore not break any specification. And, as discussed above, it is hard to find a good use case for inconsistent numbering of items within a single sequence. I understood that you support the implementation in this pull request for this specific format (please correct me if not). Hopefully the arguments above also show that for at least some if not all Pandoc supported format the Examples implementation should follow similar logic. |
Oh, I'm sorry, I misread your example. I didn't realize that you were using regular list items, not example list items. (So I thought that the example list numbering was restarting when you changed delimiters, and that's what I was objecting to.) So, yes, this is fine! And I'm sorry you had to write all those paragraphs. |
Thanks, merged. |
No description provided.